import request from '@/common/utils/request'

export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}

export function auth(data) {
  return request({
    url: '/auth',
    method: 'post',
    data
  })
}


export function wxLogin(data) {
  return request({
    url: '/oauth/render/wechat_open',
    method: 'get',
    data
  })
}

// export function wxLogin(data) {
//   return request({
//     url: '/wxLogin/login',
//     method: 'get',
//     data
//   })
// }



export function callBack(data) {
  return request({
    url: '/oauth/callback/wechat_open',
    method: 'get',
    data
  })
}

export function sms(data) {
  return request({
    url: '/wxLogin/sms',
    method: 'post',
    data
  })
}

export function getUserInfo(data) {
  return request({
    url: '/wxLogin/callBack',
    method: 'post',
    data
  })
}

export function verify(data) {
  return request({
    url: '/wxLogin/verify',
    method: 'post',
    data
  })
}
